package com.heima.shengchanzhe;

import java.util.concurrent.ArrayBlockingQueue;

public class Cook extends Thread {
    private ArrayBlockingQueue<String>bd;
    public  Cook(ArrayBlockingQueue<String>bd){
        this.bd=bd;
    }
    @Override
    public void run() {
      while (true){
          try {
              bd.put("汉堡包");
          } catch (InterruptedException e) {
              e.printStackTrace();
          }
          System.out.println("厨师放入了一个汉堡包");
      }
    }
}
